1. Field of the Invention
The present invention relates to a method for searching for memory blocks, and more particularly, to a data processing system, controller, and method for searching for specific memory blocks.
2. Description of Related Art
The markets of digital cameras, cellular phones, and MP3 players have expanded rapidly in recent years, resulting in escalated demand for storage media by consumers. The characteristics of data non-volatility, low power consumption, and compact size make the flash memory ideal for being built in the portable multi-media devices as cited above.
Furthermore, the user's increasing acceptance of electronic wallet and pre-deposit lead to the popularity of smart cards. A smart card is typically an integrated circuit (IC) chip which includes, for example, a microprocessor, a card operation system, a security module, and a memory module to allow holder of the smart card to perform preset operations. With the ability to provide computation, encryption, bidirectional communication and security functions, the smart card not only stores data but also protects the data stored therein. One exemplary application of the smart card is the subscriber identification module (SIM) of cellular phones that use global system for mobile communication (GSM). However, the smart card has a limit on the storage capacity. Thus, the smart card has recently begun to be combined with a large storage memory card to expand the storage capacity of the smart card.
In the conventional technology, the combination of the flash memory and the smart card uses special commands to distinguish between data transmitted to the smart card and data transmitted to the flash memory. Such special commands may result in the problem that hardware devices or driver programs are unable to support the special commands. In addition, in the conventional technology, type information of the data stream transmitted in the special commands is compared to determine whether the data stream is of the command format of the smart card. However, this method often results in confusion of command data of the smart card with regular file data (i.e., misinterpreting regular file data as data stream of the smart card).
In addition, in applications of electronic products with cache, due to the electronic products' own limits, data stream transmission between the smart card and the electronic products can not bypass the cache, preventing a response generated by the smart card from being transmitted without error back to the electronic product that the smart card is attached to and thereby restraining adoption of the smart card on such electronic product having cache. For example, in a cell phone with a Java system, since the Java system does not support commands such as “Non Cache” command which allow direct access to nonvolatile memory without using cache, it is difficult to combine the smart card and the flash memory into a memory card to be adopted in the cell phone with the Java system. Referring to FIG. 1, FIG. 1 is a functional block diagram of a master control unit 10 equipped with a memory card 12 in conventional technology. The master control unit 10 is a type of electronic product (e.g., a cell phone with a Java system) and has a cache 14. The memory card 12 includes a flash memory 16 and a smart card chip 18. The data transmission path between the master control unit 10 and the memory card 12 includes the cache 14. However, since the cache 14 temporarily stores data recently transmitted between the master control unit 10 and the memory card 12, when the master control unit 10 is to obtain data from the smart card chip 18, if the cache 14 already contains data corresponding to the read command, the cache 14 will transmit the corresponding data to the master control unit 10. However, under such structure, the response from the smart card chip 18 is often substituted by the data already in the cache 14 and thus the encryption function and communication security offered by the smart card chip 18 are compromised. In addition, in the conventional technology, searching for non-cached memory blocks in a cache takes an overly long time, thereby diminishing efficiency.
Accordingly, a method is needed for searching for non-cached memory blocks of a peripheral unit having a chip. A response from a smart card is transmitted free of error, wherein data of the logical blocks is not stored in a cache of a master control unit, thereby improving efficiency of the system.